package model.xpdl2{
	import mx.utils.UIDUtil;
	
	
	public class Transition{
		
		private var _id:String;
		
		private var _from:String;
		
		private var _tto:String;
		
		private var _name:String;
		
		public function Transition(from:String, tto:String){
			
			_id=UIDUtil.createUID();
			this._from=from;
			this._tto=tto;
			
		}
		
		public function genXML():String{
			
			var xml:String;
			var nspre:String="xpdl2";
			
			xml="<"+nspre+":Transition"+" From=\""+_from+"\" Id=\""+_id+"\" Name=\""+_name+"\" To=\""+_tto+"\""+">";
			xml+="</"+nspre+":Transition>";
			
			return xml;
			
		}
		
		public function get id():String{
			return _id;
		}
		
		public function set id(id:String):void{
			this._id=id;
		}
		
		public function get from():String{
			return _from;
		}
		
		public function set from(from:String):void{
			this._from=from;
		}
		
		public function get tto():String{
			return _tto;
		}
		
		public function set tto(tto:String):void{
			this._tto=tto;
		}
		
		public function get name():String{
			return _name;
		}
		
		public function set name(name:String):void{
			this._name=name;
		}

	}
}